Skip to content

Feature: GUI Client Scan mode Center/Span in addition to Start/Stop#107

Open
FlorenceBerterottiere wants to merge 7 commits into
mainfrom
feature/span_points_scan
Open

Feature: GUI Client Scan mode Center/Span in addition to Start/Stop#107
FlorenceBerterottiere wants to merge 7 commits into
mainfrom
feature/span_points_scan

Conversation

@FlorenceBerterottiere

Copy link
Copy Markdown
Collaborator

added the option to scan either in start/stop mode, or with center/span mode, where the center value is the previously calibrated value and the span is provided by the user.
Fix to issue #84

image

@FlorenceBerterottiere

Copy link
Copy Markdown
Collaborator Author

I want to flag that this PR still contains the bug that I disclose here : #109

@aferk aferk changed the title Feature/span points scan Feature: GUI Client Scan mode Center/Span in addition to Start/Stop May 27, 2026
@aferk aferk added the frontend Introduces changes to the web frontend label May 27, 2026
@aferk
aferk marked this pull request as draft May 27, 2026 09:43
@FlorenceBerterottiere
FlorenceBerterottiere marked this pull request as ready for review May 27, 2026 10:51
@beitler

beitler commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

@FlorenceBerterottiere Please rebase on latest main
@antti-ethz please review and provide your assessment

@beitler beitler added this to the 1.0.0 milestone Jul 8, 2026
Florence Berterottiere and others added 6 commits July 13, 2026 15:02
…an mode, where the center value is the previously calibrated value and the span is provided by the user
Center/span mode (and manual input) could produce scan ranges outside the
min/max values defined by the experiment library, e.g. a negative
TimeParameter. Now the frontend clamps start/stop to the allowed range at
submit time before generating the scan values, and the server snaps any
remaining out-of-range value to the nearest bound (also absorbing linspace
floating-point overshoot at the endpoints) instead of persisting it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Center and span are reconstructed from start/stop on every render, so a typed
0.0151 came back as 0.015099999999996783 through the binary float round-trip.
Round both to 12 significant digits, well below the ~16-digit noise floor and
far above any physically meaningful precision.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@antti-ethz

Copy link
Copy Markdown
Collaborator

Hi @FlorenceBerterottiere

I played around with it and found some unexpected behaviour - at least unexpected to me, it might be that my expectations are wrong. Anyway, reporting them all here.


(1) - Switching parameters in Center/Span mode overwrites the per-parameter scan-settings memory:

  1. In Start/Stop mode, select param A: start 10, stop 20, points 5, pattern Linear.
  2. Switch to param B: start 0, stop 1, points 100, pattern Scatter.
  3. Switch back to A, then to B - each restores its own settings (the existing per-parameter memory, working as baseline).
  4. With B selected, toggle to Center/Span, then switch the parameter to A.

Expected: A comes back with its remembered settings (10–20, 5 points, Linear), recentered on A's current value.

Actual: the card shows B's span (1), B's points (100) and B's pattern (Scatter) applied to A.


(2) - Toggling the mode rewrites the configured scan range (use a parameter whose current value differs from the range - say its value on the Parameters page is 42):

  1. In Start/Stop mode set start 10, stop 20.
  2. Toggle to Center/Span, then straight back to Start/Stop.

Expected: toggling the representation back and forth leaves the configured scan unchanged (start 10, stop 20).

Actual: Center seeds from the live value on entry (42 instead of 15), so after the round trip start/stop read 37/47 - the scan changed without any field being edited.

Variant: in Center/Span mode manually type Center 5, toggle to Start/Stop and back - the manually set 5 is replaced by 42.


(3) - The selected input mode doesn't survive group/namespace changes.

  1. in Center/Span mode, change the Display Group (or Namespace) dropdown.

Expected: the card stays in Center/Span mode.

Actual: it silently flips back to Start/Stop.


(4) - Out-of-bounds scans are clamped silently; the executed scan differs from what the form shows, with no feedback (needs a parameter with bounds; I used "pulse time" of the Spline RF example, which has min_value=10):

  1. In Center/Span mode set Center 11, Span 6 - so the requested range is 8–14, crossing the min bound.
  2. Submit.

Expected: either a validation error, or at least a notice that the range was clamped.

Actual: green "Job submitted" toast, no warning. The recorded scan values run 10.0–14.0 (evenly spaced) — the executed scan is centered on 12, not the 11 the form still displays.


(5) - Minor stuff

  • In Center/Span mode with Span = 0, submitting gives "Start and stop cannot be the same". A bit confusing when the visible fields are Center and Span.
  • There's a minor layout issue with the Scan Parameter components now, I see a scrollbar in it and the content is not completely visible. See screenshot.
scrollbar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend Introduces changes to the web frontend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants